﻿package json;

import java.util.Date;
import java.util.HashMap;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 新闻类型
 * 
 * @author 周俊言
 * @version 1.0 2011-08-24
 * 
 */
public class Json_Article implements Parcelable {

	public HashMap<String, Object> map = new HashMap<String, Object>();

	private long articleid;
	private long uaid;
	private String uaname;
	private String author;
	private String title;
	private int displayorder;
	private String tag;
	private String summary;
	private String content;
	private Date createtime;
	private long cateid;
	private String catename;
	private int state;
	private int view;
	private long siteid;
	private String createip;
	private int topart;
	private String updateip;
	private Date updatetime;

	public long getArticleid() {
		return articleid;
	}

	public void setArticleid(long articleid) {
		this.articleid = articleid;
	}

	public long getUaid() {
		return uaid;
	}

	public void setUaid(long uaid) {
		this.uaid = uaid;
	}

	public String getUaname() {
		return uaname;
	}

	public void setUaname(String uaname) {
		this.uaname = uaname;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getDisplayorder() {
		return displayorder;
	}

	public void setDisplayorder(int displayorder) {
		this.displayorder = displayorder;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public long getCateid() {
		return cateid;
	}

	public void setCateid(long cateid) {
		this.cateid = cateid;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getView() {
		return view;
	}

	public void setView(int view) {
		this.view = view;
	}

	public long getSiteid() {
		return siteid;
	}

	public void setSiteid(long siteid) {
		this.siteid = siteid;
	}

	public String getCreateip() {
		return createip;
	}

	public void setCreateip(String createip) {
		this.createip = createip;
	}

	public int getTopart() {
		return topart;
	}

	public void setTopart(int topart) {
		this.topart = topart;
	}

	public void setUpdateip(String updateip) {
		this.updateip = updateip;
	}

	public String getUpdateip() {
		return updateip;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setCatename(String catename) {
		this.catename = catename;
	}

	public String getCatename() {
		return catename;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeMap(map);
		dest.writeString(content);
		dest.writeString(title);
		dest.writeLong(articleid);
	}

	public static final Parcelable.Creator<Json_Article> CREATOR = new Parcelable.Creator<Json_Article>() {
		// 重写Creator

		@SuppressWarnings("unchecked")
		@Override
		public Json_Article createFromParcel(Parcel source) {
			Json_Article p = new Json_Article();
			p.map = source.readHashMap(HashMap.class.getClassLoader());
			p.setArticleid(source.readLong());
			p.setTitle(source.readString());
			p.setContent(source.readString());
			return p;
		}

		@Override
		public Json_Article[] newArray(int size) {
			// TODO Auto-generated method stub
			return null;
		}
	};
}
